cmake_minimum_required(VERSION 2.8.3)
project(lidar_fake_perception)

set(CMAKE_CXX_FLAGS "-O2 -Wall ${CMAKE_CXX_FLAGS}")

find_package(autoware_build_flags REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  autoware_msgs
  geometry_msgs
  pcl_ros
  roscpp
  sensor_msgs
  tf
  tf_conversions
)

catkin_package(
  INCLUDE_DIRS include
  CATKIN_DEPENDS
    autoware_msgs
    geometry_msgs
    sensor_msgs
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

add_executable(lidar_fake_perception_node
  nodes/lidar_fake_perception.cpp
  nodes/lidar_fake_perception_node.cpp
)
target_link_libraries(lidar_fake_perception_node
  ${catkin_LIBRARIES}
)
add_dependencies(lidar_fake_perception_node
  ${catkin_EXPORTED_TARGETS}
)

install(TARGETS
  lidar_fake_perception_node
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY launch/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
  PATTERN ".svn" EXCLUDE
)
